package services

import (
	"Sales_system/Dao"
	//"github.com/unknwon/com"
)

func Getallconsumer() (error,[]Dao.Consumer, int64){
	err, conData, total := Dao.Getallconsumer()
	return err, conData, total
}

func Deleteconsumer(id string) error {
	//_id := com.StrTo(id).MustInt()
	err := Dao.DeleteConsumer(id)
	return err
}

func Updateconsumer(consumer Dao.Consumer) error  {
	err := Dao.UpdateConsumer(consumer)
	return err
}

func Addconsumer(consumer Dao.Consumer) error {
	err := Dao.AddConsumer(consumer)
	return err
}